<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\PayType */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="pay-type-form">

    <?php $form = ActiveForm::begin([
            'options'=>['enctype' => 'multipart/form-data'],        
    ]); ?>

    <div style="both:clear;"></div>
        <?php if(!empty($model->pic)){ ?>
    <div class="control-group" style="margin-top:10px;">
        <label class="control-label" for="ArticleCat_forupload">缩略图预览</label>
        <div class="controls"><img src="<?php echo Yii::getAlias('@bar').DIRECTORY_SEPARATOR.$model->pic; ?>" width="100"></div>
    </div>
        <?php } ?>      
    <?= $form->field($model, 'pic')->fileInput() ?>    

    <div style="both:clear;"></div>
        <?php if(!empty($model->icon)){ ?>
    <div class="control-group" style="margin-top:10px;">
        <label class="control-label" for="ArticleCat_forupload">缩略图预览</label>
        <div class="controls"><img src="<?php echo Yii::getAlias('@bar').DIRECTORY_SEPARATOR.$model->icon; ?>" width="100"></div>
    </div>
        <?php } ?>      
    <?= $form->field($model, 'icon')->fileInput() ?>     
    
    <?= $form->field($model, 'sort')->textInput() ?>

    <?= $form->field($model, 'tag')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'payname')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'fee')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'rebate')->textInput() ?>

    <?= $form->field($model, 'account')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'key')->textInput(['maxlength' => true]) ?>    
    
    <?= $form->field($model, 'content')->textarea(['rows' => 6]) ?>

    <?= $form->field($model, 'isdisplay')->radioList([1=>'显示',0=>'不显示']) ?>

    <?= $form->field($model, 'status')->radioList([1=>'启用',0=>'不启用']) ?>    

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
